<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateSystemConfigTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('system_config', function (Blueprint $table) {
            $table->increments('id')->comment('ID');
            $table->string('group',30)->nullable()->comment('组');
            $table->string('key',200)->comment('键');
            $table->string('value',30)->comment('值');
            $table->string('desc',13)->nullable()->default(null)->comment('说明');
            $table->index('key','key');
            $table->comment('系统配置表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('system_config', function (Blueprint $table) {
            //
        });
    }
}
